import React from "react";
import { Select, SelectProps } from "antd";
import { omit } from "lodash";
import "./index.less";
class VSelect extends React.Component<SelectProps<any>> {
  render() {
    const { options } = this.props;
    return <Select
      {...omit(this.props, ["options"])}
      className="visbar-select"
      style={omit(this.props.style, ["top", "left", "width", "height"])}
    >
      {
        (options || []).map(item => {
          return (<Select.Option value={item.value} key={item.value}>
            { item.label }
          </Select.Option>)
        })
      }
    </Select>
  }
}

export default VSelect;